package com.springboot.ww.platform.pd.lms.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.springboot.ww.platform.pd.lms.api.PddCommonDTO;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * 描述：
 *
 * @author 🧑 ‍wanwei
 * @since 2024-07-18 17:09
 */
@NoArgsConstructor
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PddListingAddReq extends PddCommonDTO {

    @JsonProperty("cat1Id")
    private Integer cat1Id;
    @JsonProperty("cat2Id")
    private Integer cat2Id;
    @JsonProperty("cat3Id")
    private Integer cat3Id;
    @JsonProperty("cat4Id")
    private Integer cat4Id;
    @JsonProperty("cat5Id")
    private Integer cat5Id;
    @JsonProperty("cat6Id")
    private Integer cat6Id;
    @JsonProperty("cat7Id")
    private Integer cat7Id;
    @JsonProperty("cat8Id")
    private Integer cat8Id;
    @JsonProperty("cat9Id")
    private Integer cat9Id;
    @JsonProperty("cat10Id")
    private Integer cat10Id;
    @JsonProperty("productName")
    private String productName;
    @JsonProperty("productPropertyReqs")
    private List<ProductPropertyReqsDTO> productPropertyReqs;
    @JsonProperty("productSkcReqs")
    private List<ProductSkcReqsDTO> productSkcReqs;
    @JsonProperty("productSpecPropertyReqs")
    private List<ProductSpecPropertyReqsDTO> productSpecPropertyReqs;
    @JsonProperty("carouselImageUrls")
    private List<String> carouselImageUrls;
    @JsonProperty("materialImgUrl")
    private String materialImgUrl;
    @JsonProperty("goodsLayerDecorationReqs")
    private List<GoodsLayerDecorationReq> goodsLayerDecorationReqs;
    @JsonProperty("sizeTemplateIds")
    private List<String> sizeTemplateIds;
    @JsonProperty("showSizeTemplateIds")
    private List<String> showSizeTemplateIds;
    @JsonProperty("goodsModelReqs")
    private List<GoodsModelReq> goodsModelReqs;
    @JsonProperty("productWhExtAttrReq")
    private ProductWhExtAttrReqDTO productWhExtAttrReq;
    @JsonProperty("productOuterPackageImageReqs")
    private List<ProductOuterPackageImageReqsDTO> productOuterPackageImageReqs;
    @JsonProperty("productOuterPackageReq")
    private ProductOuterPackageReqDTO productOuterPackageReq;
    @JsonProperty("productNonAuditExtAttrReq")
    private ProductNonAuditExtAttrReqDTO productNonAuditExtAttrReq;
    @JsonProperty("productShipmentReq")
    private ProductShipmentReqDTO productShipmentReq;
    @JsonProperty("productSemiManagedReq")
    private ProductSemiManagedReqDTO productSemiManagedReq;

    private List<ProductI18nReqDTO> productI18nReqs;

    private ProductWarehouseRouteReq productWarehouseRouteReq;

    private List<GuideFileReq> productGuideFileReqs;



    @NoArgsConstructor
    @Data
    public static class GoodsModelReq {
        private String sizeSpecName;
        private String modelId;
        private Long sizeSpecId;
        private String modelWaist;
        private Integer modelType;
        private String modelName;
        private String modelHeight;
        private Integer modelFeature;
        private String modelFootWidth;
        private String modelBust;
        private String modelFootLength;
        private String tryOnResult;
        private String modelHip;

    }


    @NoArgsConstructor
    @Data
    public static class GuideFileReq {
        private String fileName;
        private String pdfMaterialId;
        private List<String> languages;
    }


    @NoArgsConstructor
    @Data
    public static class GoodsLayerDecorationReq {
        private String lang;
        private String type;
        private Integer priority;
        private String key;
        private List<GoodsLayerDecorationContentReq> contentList;


        @NoArgsConstructor
        @Data
        public static class GoodsLayerDecorationContentReq {
            private String imgUrl;
            private String width;
            private String text;
            private String height;
            private TextModuleDetailReq textModuleDetails;

            @NoArgsConstructor
            @Data
            public static class TextModuleDetailReq {
                private String backgroundColor;
                private String fontFamily;
                private String fontSize;
                private String align;
                private String fontColor;
            }
        }


    }


    @NoArgsConstructor
    @Data
    public static class ProductWarehouseRouteReq {
        List<TargetRouteDTO> targetRouteList;
    }

    @NoArgsConstructor
    @Data
    public static class TargetRouteDTO {
        private List<Integer> siteIdList;
        private String warehouseId;
    }

    @NoArgsConstructor
    @Data
    public static class ProductI18nReqDTO {
        private String language;
        private String productName;
    }

    @NoArgsConstructor
    @Data
    public static class ProductWhExtAttrReqDTO {
        @JsonProperty("outerGoodsUrl")
        private String outerGoodsUrl;
        @JsonProperty("productOrigin")
        private ProductOriginDTO productOrigin;

        @NoArgsConstructor
        @Data
        public static class ProductOriginDTO {
            @JsonProperty("countryShortName")
            private String countryShortName;
            @JsonProperty("region2Id")
            private String region2Id;
        }
    }

    @NoArgsConstructor
    @Data
    public static class ProductOuterPackageReqDTO {
        @JsonProperty("packageShape")
        private Integer packageShape;
        @JsonProperty("packageType")
        private Integer packageType;
    }

    @NoArgsConstructor
    @Data
    public static class ProductNonAuditExtAttrReqDTO {
        @JsonProperty("california65WarningInfoReq")
        private California65WarningInfoReqDTO california65WarningInfoReq;
        @JsonProperty("cosmeticInfoReq")
        private CosmeticInfoReqDTO cosmeticInfoReq;

        @NoArgsConstructor
        @Data
        public static class California65WarningInfoReqDTO {
            @JsonProperty("california65WarningType")
            private Object california65WarningType;
            @JsonProperty("california65ChemicalNames")
            private Object california65ChemicalNames;
        }

        @NoArgsConstructor
        @Data
        public static class CosmeticInfoReqDTO {
        }
    }

    @NoArgsConstructor
    @Data
    public static class ProductShipmentReqDTO {
        @JsonProperty("freightTemplateId")
        private String freightTemplateId;
        @JsonProperty("shipmentLimitSecond")
        private Integer shipmentLimitSecond;
    }

    @NoArgsConstructor
    @Data
    public static class ProductSemiManagedReqDTO {
        @JsonProperty("bindSiteIds")
        private List<Integer> bindSiteIds;
    }

    @NoArgsConstructor
    @Data
    public static class ProductPropertyReqsDTO {
        @JsonProperty("templatePid")
        private Long templatePid;
        @JsonProperty("pid")
        private Long pid;
        @JsonProperty("refPid")
        private Long refPid;
        @JsonProperty("propName")
        private String propName;
        @JsonProperty("vid")
        private Long vid;
        @JsonProperty("propValue")
        private String propValue;
        @JsonProperty("valueUnit")
        private String valueUnit;
        @JsonProperty("valueExtendInfo")
        private String valueExtendInfo;
        @JsonProperty("numberInputValue")
        private String numberInputValue;
    }

    @NoArgsConstructor
    @Data
    public static class ProductSkcReqsDTO {
        @JsonProperty("previewImgUrls")
        private List<String> previewImgUrls;
        @JsonProperty("extCode")
        private String extCode;
        @JsonProperty("mainProductSkuSpecReqs")
        private List<MainProductSkuSpecReqsDTO> mainProductSkuSpecReqs;
        @JsonProperty("productSkuReqs")
        private List<ProductSkuReqsDTO> productSkuReqs;

        @NoArgsConstructor
        @Data
        public static class MainProductSkuSpecReqsDTO {
            @JsonProperty("parentSpecId")
            private Long parentSpecId;
            @JsonProperty("parentSpecName")
            private String parentSpecName;
            @JsonProperty("specId")
            private Long specId;
            @JsonProperty("specName")
            private String specName;
        }

        @NoArgsConstructor
        @Data
        public static class ProductSkuReqsDTO {
            @JsonProperty("thumbUrl")
            private String thumbUrl;
            @JsonProperty("productSkuThumbUrlI18nReqs")
            private List<?> productSkuThumbUrlI18nReqs;
            @JsonProperty("extCode")
            private String extCode;
            @JsonProperty("supplierPrice")
            private BigDecimal supplierPrice;
            @JsonProperty("siteSupplierPrices")
            private List<SiteSupplierPrice> siteSupplierPrices;
            private ProductSkuStockQuantity productSkuStockQuantityReq;
            @JsonProperty("currencyType")
            private String currencyType;
            @JsonProperty("productSkuSpecReqs")
            private List<ProductSkuSpecReqsDTO> productSkuSpecReqs;
            @JsonProperty("productSkuWhExtAttrReq")
            private ProductSkuWhExtAttrReqDTO productSkuWhExtAttrReq;

            private ProductSkuSuggestedPriceReq productSkuSuggestedPriceReq;

            @NoArgsConstructor
            @Data
            public static class SiteSupplierPrice {
                @JsonProperty("siteId")
                private Integer siteId;
                @JsonProperty("supplierPrice")
                private BigDecimal supplierPrice;
            }

            @NoArgsConstructor
            @Data
            public static class ProductSkuSuggestedPriceReq {
                @JsonProperty("suggestedPrice")
                private BigDecimal suggestedPrice;
                private String suggestedPriceCurrencyType;
            }

            @NoArgsConstructor
            @Data
            public static class ProductSkuStockQuantity {
                private List<WarehouseStockQuantityReq> warehouseStockQuantityReqs;
            }

            @NoArgsConstructor
            @Data
            public static class WarehouseStockQuantityReq {
                private Integer targetStockAvailable;
                private String warehouseId;
            }

            @NoArgsConstructor
            @Data
            public static class ProductSkuWhExtAttrReqDTO {
                @JsonProperty("productSkuVolumeReq")
                private ProductSkuVolumeReqDTO productSkuVolumeReq;
                @JsonProperty("productSkuWeightReq")
                private ProductSkuWeightReqDTO productSkuWeightReq;
                @JsonProperty("productSkuBarCodeReqs")
                private List<?> productSkuBarCodeReqs;
                @JsonProperty("productSkuSensitiveAttrReq")
                private ProductSkuSensitiveAttrReqDTO productSkuSensitiveAttrReq;
                @JsonProperty("productSkuSensitiveLimitReq")
                private ProductSkuSensitiveLimitReqDTO productSkuSensitiveLimitReq;

                @NoArgsConstructor
                @Data
                public static class ProductSkuVolumeReqDTO {
                    @JsonProperty("len")
                    private BigDecimal len;
                    @JsonProperty("width")
                    private BigDecimal width;
                    @JsonProperty("height")
                    private BigDecimal height;
                }

                @NoArgsConstructor
                @Data
                public static class ProductSkuWeightReqDTO {
                    @JsonProperty("value")
                    private BigDecimal value;
                }

                @NoArgsConstructor
                @Data
                public static class ProductSkuSensitiveAttrReqDTO {
                    @JsonProperty("isSensitive")
                    private Integer isSensitive;
                    @JsonProperty("sensitiveList")
                    private List<?> sensitiveList;
                }

                @NoArgsConstructor
                @Data
                public static class ProductSkuSensitiveLimitReqDTO {
                }
            }

            @NoArgsConstructor
            @Data
            public static class ProductSkuSpecReqsDTO {
                @JsonProperty("parentSpecId")
                private Long parentSpecId;
                @JsonProperty("parentSpecName")
                private String parentSpecName;
                @JsonProperty("specId")
                private Long specId;
                @JsonProperty("specName")
                private String specName;
            }
        }
    }

    @NoArgsConstructor
    @Data
    public static class ProductSpecPropertyReqsDTO {
        @JsonProperty("parentSpecId")
        private Long parentSpecId;
        @JsonProperty("parentSpecName")
        private String parentSpecName;
        @JsonProperty("specId")
        private Long specId;
        @JsonProperty("specName")
        private String specName;
        @JsonProperty("refPid")
        private Long refPid;
        @JsonProperty("pid")
        private Long pid;
        @JsonProperty("templatePid")
        private Long templatePid;
        @JsonProperty("propName")
        private String propName;
        @JsonProperty("vid")
        private Long vid;
        @JsonProperty("propValue")
        private String propValue;
        @JsonProperty("valueUnit")
        private String valueUnit;
        @JsonProperty("valueGroupId")
        private String valueGroupId;
        @JsonProperty("valueGroupName")
        private String valueGroupName;
        @JsonProperty("valueExtendInfo")
        private String valueExtendInfo;
        @JsonProperty("numberInputValue")
        private String numberInputValue;
    }

    @NoArgsConstructor
    @Data
    public static class ProductOuterPackageImageReqsDTO {
        @JsonProperty("imageUrl")
        private String imageUrl;
    }
}
